Skip to content

Upgrade to .NET 6 - #717

Closed
mishamyte wants to merge 16 commits into
loic-sharma:mainfrom
mishamyte:net6.0
Closed

mishamyte wants to merge 16 commits into
loic-sharma:mainfrom
mishamyte:net6.0

Conversation

@mishamyte

@mishamyte mishamyte commented Jan 13, 2022 •

Copy link
Copy Markdown

Hi @loic-sharma,

Thank you for awesome project (hope it is alive). Wanna contribute and make some new feature extensions, but first of all, the code base of BaGet should be updated to the new stack. So I have decided to start from update PR.


This closes #707 and #618 (as outdated). Also it helps us to use the latest features/libraries and performance of .NET 6


Next work should be done:

  • Update projects to .NET 6 and C# 10
  • Update Dockerfile
  • Update pipelines
  • Bump package dependencies
  • Check/adjust tests, if needed
  • Add .NET 6 to list of supported frameworks

Test:

  • Docker
  • MySQL
  • Postgres
  • SQLite
  • SQL Server

Also need to pay attention to:

  • Pomelo.EntityFrameworkCore.MySql v6.0.0 has breaking changes, now MySql version should be specified. Now the feature of version autodetection was used in BaGet.Database.MySql
  • BaGet.Azure uses very outdated libraries Microsoft.Azure.Search & Microsoft.Azure.Storage.Blob. Last release Azure.Search.Documents & Azure.Storage.Blobs should be used and project should be rewritten to their API (I think we will extract it to the new issue, but I need to document this founding here) (extracted to Use not outdated libraries in BaGet.Azure #720)

I will continue to test/adjust the project, but help would be appreciated. I think when majority of items would be done, it would be cool to release a new alpha version for mass testing

@mishamyte

Copy link
Copy Markdown
Author

Succeeded testing with Postgres (PostgreSQL) 14.1 (Debian 14.1-1.pgdg110+1)

@mishamyte

mishamyte commented Jan 18, 2022 •

Copy link
Copy Markdown
Author

Succeeded testing with Microsoft SQL Server 2019 (RTM-CU14) (KB5007182) - 15.0.4188.2 (X64) Nov 3 2021 19:19:51 Copyright (C) 2019 Microsoft Corporation Developer Edition (64-bit) on Linux (Ubuntu 20.04.3 LTS) <X64>

@mishamyte

Copy link
Copy Markdown
Author

Failed testing with MySQL Ver 8.0.27 for Linux on x86_64 (MySQL Community Server - GPL). Error while executing migration. Additional investigation will be done

@mishamyte

mishamyte commented Jan 21, 2022 •

Copy link
Copy Markdown
Author

OK, I'm stuck a little.

But seems like Pomelo.EntityFrameworkCore.MySql have change some generation strategy from v5.0 and now we are receiving an error

MySqlConnector.MySqlException (0x80004005): Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs

Cause now migrations (existing one) generates next script

CREATE TABLE `Packages` (
    `Key` int NOT NULL AUTO_INCREMENT,
    `Id` varchar(128) NOT NULL,
    `Authors` varchar(4000) NULL,
    `Description` varchar(4000) NULL,
    `Downloads` bigint NOT NULL,
    `HasReadme` tinyint(1) NOT NULL,
    `Language` varchar(20) NULL,
    `Listed` tinyint(1) NOT NULL,
    `MinClientVersion` varchar(44) NULL,
    `Published` datetime(6) NOT NULL,
    `RequireLicenseAcceptance` tinyint(1) NOT NULL,
    `Summary` varchar(4000) NULL,
    `Title` varchar(256) NULL,
    `IconUrl` varchar(4000) NULL,
    `LicenseUrl` varchar(4000) NULL,
    `ProjectUrl` varchar(4000) NULL,
    `RepositoryUrl` varchar(4000) NULL,
    `RepositoryType` varchar(100) NULL,
    `Tags` varchar(4000) NULL,
    `RowVersion` datetime(6) NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
    `Version` varchar(64) NOT NULL,
    CONSTRAINT `PK_Packages` PRIMARY KEY (`Key`)
);

Instead of using longtext for big columns. Now I dunno how to fix it.

If someone has an ideas - I would appreciate it

UPD. Has asked in PomeloFoundation/Pomelo.EntityFrameworkCore.MySql#1606

@mishamyte

mishamyte commented Jan 23, 2022 •

Copy link
Copy Markdown
Author

Succeeded testing with MySQL Ver 8.0.27 for Linux on x86_64 (MySQL Community Server - GPL)

  • Using a new DB
  • Upgrading an existing DB

@mishamyte

Copy link
Copy Markdown
Author

@loic-sharma seems like I finished planned jobs.

Could you please:

  • Review this PR (I would be right happy to answer the questions if needed)
  • Merge & make a beta-build for mass testing

@mishamyte
mishamyte marked this pull request as ready for review January 23, 2022 00:32
@AndrewTriesToCode

Copy link
Copy Markdown

This is a great PR. I hope the maintainer will be able to review and include it.

@cenit

cenit commented Jan 26, 2022

Copy link
Copy Markdown

agree, great PR, already using it ^_^

@mishamyte

Copy link
Copy Markdown
Author

@loic-sharma any chance this PR will see the world?

Comment thread Dockerfile Resolved
Comment thread src/BaGet.Aws/BaGet.Aws.csproj Resolved
Comment thread src/BaGet/BaGet.csproj
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="$(MicrosoftEntityFrameworkCorePackageVersion)">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>

@loic-sharma loic-sharma Feb 21, 2022 •

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason behind this change for Microsoft.EntityFrameworkCore.Design?

@mishamyte mishamyte Feb 21, 2022 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason is to define it as design-time dependency for concrete project and does not include it's dll as a part of artifacts or as a part of implicit dependency to other projects

(https://docs.microsoft.com/en-us/ef/core/cli/services#referencing-microsoftentityframeworkcoredesign)

@mishamyte

mishamyte commented Feb 21, 2022 •

Copy link
Copy Markdown
Author

@loic-sharma should we separate DB provider-related package versions from the variable $(MicrosoftEntityFrameworkCorePackageVersion), like it is done in MySQL & PostgreSQL packages. This allows us to deploy a fix-versions of packages more easily.

For now there is a possibility to upgrade next deps:

» BaGet.Azure (related to separate issue)
...

» BaGet.Tests
  [net6.0]
  Microsoft.AspNetCore.Mvc.Testing  6.0.1 -> 6.0.2

» BaGet.Core
  [net6.0]
  Microsoft.EntityFrameworkCore.Relational  6.0.1 -> 6.0.2

» BaGet.Database.Sqlite
  [net6.0]
  Microsoft.EntityFrameworkCore.Sqlite  6.0.1 -> 6.0.2

» BaGet.Database.SqlServer
  [net6.0]
  Microsoft.EntityFrameworkCore.SqlServer  6.0.1 -> 6.0.2

» BaGet
  [net6.0]
  Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation  6.0.1 -> 6.0.2
  Microsoft.EntityFrameworkCore.Design               6.0.1 -> 6.0.2

@mishamyte

Copy link
Copy Markdown
Author

@loic-sharma friendly ping

@BlythMeister BlythMeister mentioned this pull request Apr 27, 2022
6 tasks
@mishamyte

Copy link
Copy Markdown
Author

Let's merge, dudes?)

@cenit

cenit commented Jun 16, 2022

Copy link
Copy Markdown

before .net7 is out would be awesome

@mishamyte

Copy link
Copy Markdown
Author

@loic-sharma that's a friendly reminder from me again. Could we merge it?

@Sewer56

Sewer56 commented Jul 31, 2022

Copy link
Copy Markdown

I don't usually like to write comments with no real purpose or structure; but I do personally support the PR and would be in favour of having it merged.

@Typiqally

Copy link
Copy Markdown

Maybe @loic-sharma should add more maintainers to this project, might be too busy with other things

@GGG-KILLER GGG-KILLER mentioned this pull request Nov 23, 2022
7 tasks done
@joestr

joestr commented Dec 26, 2022

Copy link
Copy Markdown

Is there any progress on this PR?

@mishamyte

Copy link
Copy Markdown
Author

Is there any progress on this PR?

Seems like author has no more time for supporting this project. And no other maintainers

@joestr

joestr commented Dec 26, 2022

Copy link
Copy Markdown

Would someone besides me be interested in creating a maintained fork?

@JamieMagee

Copy link
Copy Markdown

Would someone besides me be interested in creating a maintained fork?

The most active fork appears to be @pieroviano's. See https://github.com/pieroviano/BaGet or #754

@mishamyte

Copy link
Copy Markdown
Author

Definitely not needed, cleaning up stuck PRs, so closing

@mishamyte mishamyte closed this Jun 7, 2026
@Sewer56

Sewer56 commented Jun 7, 2026

Copy link
Copy Markdown

A maintainer appeared!
Whoa !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement dotnet 6.0 framework filter

9 participants